import java.util.Scanner;

public class Exercise
{
    public static void main(String[] args)
    {

        Scanner in = new Scanner(System.in);

        SafeDoor[] d = new SafeDoor[2];

        for (int i = 0; i < d.length; i++)
        {
            d[i] = new SafeDoor();
            d[i].code = in.nextInt();
            d[i].material = in.next();
            d[i].safeLevel = in.nextInt();
        }

        for (int i = 0; i < d.length; i++)
        {
            d[i].open();
        }
    }
}

abstract class Door
{
    int code;//门编号

    String material;//材质

    public Door()
    {
        this(0, " ");
    }

    public Door(int code, String material)
    {
        this.code = code;
        this.material = material;
    }

    public abstract void open();
}

interface ISafe
{
    public abstract void checkFace();//人脸识别

    public abstract void checkFinger();//指纹识别
}

class SafeDoor extends Door implements ISafe
{
    int safeLevel;

    public SafeDoor()
    {
        this(0, " ", 0);
    }

    public SafeDoor(int code, String material, int safeLevel)
    {
//        super(0, " ");
        super(0, " ");
        this.safeLevel = safeLevel;
    }

    public void open()
    {
        if (safeLevel == 1)
        {
            System.out.println("材质=" + this.material + " 安全级别=" + this.safeLevel);
            this.checkFace();
        }
        else if (safeLevel == 2)
        {
            System.out.println("材质=" + this.material + " 安全级别=" + this.safeLevel);
            this.checkFace();
            this.checkFinger();
        }
    }

    public void checkFace()
    {
        System.out.println("人脸识别");
    }

    public void checkFinger()
    {
        System.out.println("指纹识别");
    }
}